﻿using System;

namespace PCSharp
{
    // nested namespace
    internal class BaseClass
    {
        public int MethodOne()
        {
            return 1;
        }

    }

    internal class SubClass : BaseClass
    {
        public int MethodOne()
        {
            return 2;
        }
    }

    internal class DemoClass
    {
        public static void Swap(ref int a, ref int b)
        {
            int t = a;
            a = b;
            b = t;
        }

        public static void DemoClassTest()
        {
            int a = 10, b = 20;

            Console.WriteLine("Before : a = {0}, b = {1}", a, b);
            DemoClass.Swap(ref a, ref b);
            Console.WriteLine("After : a = {0}, b = {1}", a, b);

            BaseClass bc = new BaseClass();
            SubClass bc2 = new SubClass();

            Console.WriteLine("{0}, {1}", bc.MethodOne(), bc2.MethodOne());
        }
    }
}

